package TrabalhoEda;

public class Ponto
{
	
    double x;
    
    double y;
    
    double z; 
    
    private double dist = 0.0;
    
    public Ponto(double x, double y, double z)
    {
        this.x = x;
        
        this.y = y;
        
        this.z = z; 
        
        this.dist = this.dst();
    }
    
    public double getX() 
    {
    	return x;
	}
    public double getY() 
    {
    	return y;
	}	

    public double getZ() 
    {
    	return z;
	}	


	public double getDist()
	{
		return dist;
	}
    
    public double dst()
    {
        return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
    }
    
    @Override public String toString()
    {
        String a = "";
        
        return a + this.dst();
    }
    
}
